Skip to content

fix(analytics): gate attribution capture on posthog config + stack-update ordering note - #4584

Merged
PierreBrisorgueil merged 1 commit into
masterfrom
fix/4002-attribution-gate
Aug 19, 2026
Merged

fix(analytics): gate attribution capture on posthog config + stack-update ordering note#4584
PierreBrisorgueil merged 1 commit into
masterfrom
fix/4002-attribution-gate

Conversation

@PierreBrisorgueil

Copy link
Copy Markdown
Collaborator

Post-merge audit follow-up on the signup-attribution feature (#4572).

Reviewers already passed pre-push: kimi gate OK (0 findings), full unit suite 2649 green, lint clean.

https://claude.ai/code/session_015AXhHayqcLntuU3AbX7No8

…date ordering note

FIX 1: the attribution plugin (src/lib/plugins/attribution.js) captured
first-touch data unconditionally, shipping the attribution key on every
signup even when PostHog analytics is unconfigured. The plan required the
feature to be inert without a configured posthog key ("no key → no capture,
no signup payload attach"). install(app) now mirrors the sibling posthog.js
gating pattern: reads app.config.globalProperties.config?.analytics?.posthog
and no-ops unless phConfig?.key is set. Plugin unit tests extended to cover
key-present (captures), key-absent, null config, and undefined config
(does not capture).

FIX 2: added a MIGRATIONS.md entry documenting the required absorption
order for the attribution feature — downstream must absorb Node PR #4024
(signup attribution schema) before Vue PR #4572. An older Node stack's
SignupUser schema is .strict() and rejects the unknown attribution key, so
absorbing Vue first breaks every local signup with a 422 until Node lands.
Documents FIX 1's gate as the mitigating condition: with analytics
unconfigured the client never attaches attribution, so only
analytics-enabled downstreams are exposed to the ordering hazard.

Claude-Session: https://claude.ai/code/session_015AXhHayqcLntuU3AbX7No8
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@PierreBrisorgueil, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bd369d59-f830-4468-8f55-b1bbf9d83d33

📥 Commits

Reviewing files that changed from the base of the PR and between c6feca7 and 87a353e.

📒 Files selected for processing (3)
  • MIGRATIONS.md
  • src/lib/plugins/attribution.js
  • src/lib/plugins/tests/attribution.unit.tests.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.60%. Comparing base (c6feca7) to head (87a353e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4584   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files          40       40           
  Lines        1533     1535    +2     
  Branches      477      478    +1     
=======================================
+ Hits         1527     1529    +2     
  Misses          6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PierreBrisorgueil
PierreBrisorgueil merged commit 9e61b85 into master Aug 19, 2026
7 checks passed
@PierreBrisorgueil
PierreBrisorgueil deleted the fix/4002-attribution-gate branch August 19, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant